﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace GPI.Server
{
   public class ActionServer
    {
       private readonly DAL.ActionDAL dal = new DAL.ActionDAL();
       /// <summary>
       /// 根据所给字符获得相关信息
       /// </summary>
       /// <param name="table">表名</param>
       /// <param name="column">列名</param>
       /// <param name="wherestr">查询条件</param>
       /// <returns></returns>
       public DataTable FindByStr(string table, string[] column, string wherestr)
       {
           return dal.FindByStr(table, column, wherestr);
       }
       /// <summary>
       /// 获取给定条件的信息总数
       /// </summary>
       /// <param name="table">表名</param>
       /// <param name="strWhere">查询条件</param>
       /// <returns></returns>
       public int GetCountByStr(string table, string strWhere)
       {
           return dal.GetCountByStr(table, strWhere);
       }
       /// <summary>
       /// 分页方法
       /// </summary>
       /// <param name="Star">开始位置</param>
       /// <param name="End">结束位置</param>
       /// <param name="table">表名称</param>
       /// <param name="wherestr">查询条件</param>
       /// <param name="Orderby">排序字段</param>
       /// <returns></returns>
       public DataTable PageByStr(int Star, int End, string table, string wherestr, string Orderby)
       {
           return dal.PageByStr(Star,End,table,wherestr,Orderby);
       }
    }
}
